import Layout from '@/layout/index.vue';
import type { AppRoute } from '@/types/route';

const blogListRouter: AppRoute[] = [
  {
    path: '/blogList',
    component: Layout,
    redirect: '/blogList/list',
    name: 'blogList',
    meta: {
      title: '江湖',
      icon: 'chat-square',
      roles: ['GUEST', 'USER']
    },
    children: [
      {
        path: '/blogList/list',
        component: () => import('@/views/blogList/index.vue'),
        name: 'blogListAll',
        meta: {
          title: '江湖',
          icon: 'chat-square',
          roles: ['GUEST', 'USER']
        }
      },
      {
        path: ':categoryId',
        component: () => import('@/views/blogList/index.vue'),
        name: 'blogListShow',
        meta: {
          title: '分类',
          roles: ['GUEST', 'USER']
        },
        hidden: true
      }
    ]
  }
];

export default blogListRouter;
